<?php


namespace EchoPHP\View;

use League\Plates\Engine;

abstract class ViewExtensionAbstract {

    /**
     * 注册函数扩展
     * @param Engine $engine
     */
    final public function register(Engine $engine) {
        $engine->registerFunction('viewExtension', [$this, 'getExtensionObject']);
    }

    /**
     * 获取去拓展类对象
     * @return $this
     */
    final public function getExtensionObject() {
        return $this;
    }
}